#pragma once
#include <iostream>
using std::ostream;

class CComplexe
{
public:
	double m_r;
	double m_i; 

	CComplexe();
	CComplexe(double real, double ima);

	CComplexe operator+ (const CComplexe& c)const;
	CComplexe operator- (const CComplexe& c)const;
	CComplexe operator- (double f)const;
	CComplexe operator- ()const;
	CComplexe operator* (const CComplexe& c)const;
	CComplexe operator* (double f)const;
	CComplexe operator/ (double f)const;
	CComplexe operator/ (const CComplexe& c)const;
	void operator/= (double f);
	void operator*= (const CComplexe& c);
	void operator+= (const CComplexe& c);
	bool operator==(const CComplexe& c)const;
	bool operator==(float f)const;

	double modulus()const;
	double modulus2()const;
	CComplexe squareRoot()const;
	CComplexe conjugate()const;
	CComplexe inverse()const;

	bool isReal()const;

};

ostream& operator<<(ostream& s, const CComplexe& c);